.class Lcom/waiqin365/h5/util/c;
.super Ljava/lang/Object;

# interfaces
.implements Ljava/lang/Runnable;


# instance fields
.field final synthetic a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;


# direct methods
.method constructor <init>(Lcom/waiqin365/h5/util/WqOpenSearchUrl;)V
    .locals 0

    iput-object p1, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 4

    :try_start_0
    new-instance v1, Lorg/json/JSONObject;

    iget-object v0, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    invoke-static {v0}, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a(Lcom/waiqin365/h5/util/WqOpenSearchUrl;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {v1, v0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    iget-object v2, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    const-string/jumbo v0, "url"

    invoke-virtual {v1, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    const-string/jumbo v0, "url"

    invoke-virtual {v1, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    :goto_0
    iput-object v0, v2, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a:Ljava/lang/String;

    iget-object v2, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    const-string/jumbo v0, "hint"

    invoke-virtual {v1, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_3

    const-string/jumbo v0, "hint"

    invoke-virtual {v1, v0}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    :goto_1
    iput-object v0, v2, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->b:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    iget-object v0, v0, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a:Ljava/lang/String;

    const-string/jumbo v1, "http://"

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    iget-object v0, v0, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a:Ljava/lang/String;

    const-string/jumbo v1, "https://"

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    iget-object v0, v0, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a:Ljava/lang/String;

    const-string/jumbo v1, "/"

    invoke-virtual {v0, v1}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    iget-object v0, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v2, "/"

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v2, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    iget-object v2, v2, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    iput-object v1, v0, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a:Ljava/lang/String;

    :cond_0
    iget-object v1, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    iget-object v0, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    iget-object v0, v0, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a:Ljava/lang/String;

    const-string/jumbo v2, "http://"

    invoke-virtual {v0, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_1

    iget-object v0, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    iget-object v0, v0, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a:Ljava/lang/String;

    const-string/jumbo v2, "https://"

    invoke-virtual {v0, v2}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_5

    :cond_1
    iget-object v0, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    iget-object v0, v0, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a:Ljava/lang/String;

    const-string/jumbo v2, "?"

    invoke-virtual {v0, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_4

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v2, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    iget-object v2, v2, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a:Ljava/lang/String;

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v2, "&t="

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    new-instance v2, Ljava/util/Date;

    invoke-direct {v2}, Ljava/util/Date;-><init>()V

    invoke-virtual {v2}, Ljava/util/Date;->getTime()J

    move-result-wide v2

    invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    :goto_2
    iput-object v0, v1, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a:Ljava/lang/String;

    iget-object v0, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    new-instance v1, Landroid/content/Intent;

    iget-object v2, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    invoke-static {v2}, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->b(Lcom/waiqin365/h5/util/WqOpenSearchUrl;)Lorg/apache/cordova/WqCordovaActivity;

    move-result-object v2

    const-class v3, Lorg/apache/cordova/WqCordovaActivity;

    invoke-direct {v1, v2, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    invoke-static {v0, v1}, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a(Lcom/waiqin365/h5/util/WqOpenSearchUrl;Landroid/content/Intent;)Landroid/content/Intent;

    iget-object v0, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    invoke-static {v0}, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->c(Lcom/waiqin365/h5/util/WqOpenSearchUrl;)Landroid/content/Intent;

    move-result-object v0

    const-string/jumbo v1, "url"

    iget-object v2, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    iget-object v2, v2, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a:Ljava/lang/String;

    invoke-static {v2}, Lorg/apache/cordova/util/Util;->addLanguageFormatForUrl(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    iget-object v0, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    invoke-static {v0}, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->c(Lcom/waiqin365/h5/util/WqOpenSearchUrl;)Landroid/content/Intent;

    move-result-object v0

    const-string/jumbo v1, "titleType"

    const-string/jumbo v2, "searchBar"

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    iget-object v0, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    invoke-static {v0}, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->c(Lcom/waiqin365/h5/util/WqOpenSearchUrl;)Landroid/content/Intent;

    move-result-object v0

    const-string/jumbo v1, "hint"

    iget-object v2, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    iget-object v2, v2, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->b:Ljava/lang/String;

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    iget-object v0, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    invoke-static {v0}, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->b(Lcom/waiqin365/h5/util/WqOpenSearchUrl;)Lorg/apache/cordova/WqCordovaActivity;

    move-result-object v0

    iget-object v1, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    invoke-static {v1}, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->c(Lcom/waiqin365/h5/util/WqOpenSearchUrl;)Landroid/content/Intent;

    move-result-object v1

    const/16 v2, 0x789

    invoke-virtual {v0, v1, v2}, Lorg/apache/cordova/WqCordovaActivity;->startActivityForResult(Landroid/content/Intent;I)V

    iget-object v0, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    invoke-static {v0}, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->b(Lcom/waiqin365/h5/util/WqOpenSearchUrl;)Lorg/apache/cordova/WqCordovaActivity;

    move-result-object v0

    const v1, 0x7f040022

    const v2, 0x7f040021

    invoke-virtual {v0, v1, v2}, Lorg/apache/cordova/WqCordovaActivity;->overridePendingTransition(II)V

    :goto_3
    return-void

    :cond_2
    const-string/jumbo v0, ""

    goto/16 :goto_0

    :cond_3
    const-string/jumbo v0, ""

    goto/16 :goto_1

    :cond_4
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    iget-object v2, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    iget-object v2, v2, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a:Ljava/lang/String;

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v2, "?t="

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    new-instance v2, Ljava/util/Date;

    invoke-direct {v2}, Ljava/util/Date;-><init>()V

    invoke-virtual {v2}, Ljava/util/Date;->getTime()J

    move-result-wide v2

    invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    goto/16 :goto_2

    :cond_5
    iget-object v0, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    iget-object v0, v0, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a:Ljava/lang/String;

    const-string/jumbo v2, "?"

    invoke-virtual {v0, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z

    move-result v0

    if-eqz v0, :cond_6

    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/fiberhome/gaea/client/c/b;->d()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v2, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    iget-object v2, v2, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a:Ljava/lang/String;

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v2, "&t="

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    new-instance v2, Ljava/util/Date;

    invoke-direct {v2}, Ljava/util/Date;-><init>()V

    invoke-virtual {v2}, Ljava/util/Date;->getTime()J

    move-result-wide v2

    invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    goto/16 :goto_2

    :cond_6
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/fiberhome/gaea/client/c/b;->d()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    iget-object v2, p0, Lcom/waiqin365/h5/util/c;->a:Lcom/waiqin365/h5/util/WqOpenSearchUrl;

    iget-object v2, v2, Lcom/waiqin365/h5/util/WqOpenSearchUrl;->a:Ljava/lang/String;

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string/jumbo v2, "?t="

    invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    new-instance v2, Ljava/util/Date;

    invoke-direct {v2}, Ljava/util/Date;-><init>()V

    invoke-virtual {v2}, Ljava/util/Date;->getTime()J

    move-result-wide v2

    invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    goto/16 :goto_2

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    goto/16 :goto_3
.end method
